﻿<ResourceDictionary xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
                    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
                    xmlns:extended="clr-namespace:HBCode.ExtendedControls"
                    xmlns:ribbon="clr-namespace:Microsoft.Windows.Controls.Ribbon;assembly=RibbonControlsLibrary">
    <Style TargetType="{x:Type extended:ModalDialogPopup}">
        <Setter Property="Background" Value="White"/>
        <Setter Property="Template">
            <Setter.Value>
                <ControlTemplate TargetType="{x:Type extended:ModalDialogPopup}">
                    <Popup x:Name="dialog" AllowsTransparency="True">
                        <Border BorderThickness="1" CornerRadius="4" BorderBrush="Black" 
                                Background="{TemplateBinding Background}" Padding="5">
                            <Grid x:Name="content"
                              Margin="{TemplateBinding Margin}" 
                              HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}" 
                              VerticalAlignment="{TemplateBinding VerticalContentAlignment}">
                                <Grid.RowDefinitions>
                                    <RowDefinition Height="30"/>
                                    <RowDefinition Height="*"/>
                                    <RowDefinition Height="40" />
                                </Grid.RowDefinitions>
                                <TextBlock x:Name="textBlockTitle" Grid.Row="0"/>
                                <!-- the hosted content -->
                                <ContentPresenter x:Name="contentHost" Grid.Row="1" Margin="5"/>
                                <StackPanel Grid.Row="2" Orientation="Horizontal" HorizontalAlignment="Right">
                                    <Button Content="Ok" x:Name="buttonOK" Style="{DynamicResource SimpleButton}" 
                                            MinWidth="100" Margin="0,5,5,5" />
                                    <Button Content="Cancel" Style="{DynamicResource SimpleButton}" x:Name="buttonCancel" 
                                            MinWidth="100" Margin="0,5,5,5" />
                                </StackPanel>
                            </Grid>
                        </Border>
                    </Popup>
                </ControlTemplate>
            </Setter.Value>
        </Setter>
    </Style>

    <Style x:Key="ribbonButtonTool" TargetType="{x:Type ribbon:RibbonButton}">
        <Setter Property="ToolTip" Value="{Binding Path=Label, RelativeSource={RelativeSource Self}}" />
        <Style.Triggers>
            <Trigger Property="Command" Value="{x:Null}">
                <Setter Property="Visibility" Value="Collapsed" />
            </Trigger>
        </Style.Triggers>
    </Style>

    <Style x:Key="ribbonContextualRibbonGroup" TargetType="{x:Type ribbon:RibbonGroup}">
        <Style.Triggers>
            <MultiDataTrigger>
                <MultiDataTrigger.Conditions>
                    <Condition Binding="{Binding Path=Command, ElementName=rbAddNew}" Value="{x:Null}" />
                    <Condition Binding="{Binding Path=Command, ElementName=rbDelete}" Value="{x:Null}" />
                    <Condition Binding="{Binding Path=Command, ElementName=rbSave}" Value="{x:Null}" />
                    <Condition Binding="{Binding Path=Command, ElementName=rbCancel}" Value="{x:Null}" />
                </MultiDataTrigger.Conditions>
                <Setter Property="Visibility" Value="Collapsed" />
            </MultiDataTrigger>
        </Style.Triggers>
    </Style>

    <SolidColorBrush x:Key="Office2010Background" Color="#FFC7D9ED" />
</ResourceDictionary>